#pragma once
#include <uv.h>
class LoopContrller
{
public:
	static LoopContrller& Getinstance();
	~LoopContrller();
	uv_loop_t* GetLoop(){return m_loop;}
	void StartRun();
	void StopRun();
	void OnStopLoop();
private:
	LoopContrller();
private:
	uv_loop_t* m_loop=nullptr;
	bool m_bRun=false;
	uv_async_t m_uvStopAsync;
};
#define g_LoopContr LoopContrller::Getinstance()
#define g_Loop LoopContrller::Getinstance().GetLoop()


